//
//  F_SucceedVC.swift
//  letuofu
//
//  Created by dooland2 on 2020/3/7.
//  Copyright © 2020 WH-JS. All rights reserved.
//

import UIKit

class F_SucceedVC: BaseViewControllerWithHeader {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        setupUI()
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}

// MARK: UI
extension F_SucceedVC {
    func setupUI() {
        scrollView.backgroundColor = .white
        safeView.backgroundColor = .xF2F2F2
        headView.backgroundColor = .white
        headTitle.text = "通知消息"
        
        //画横线
        let line = scrollView.drawView { (make) in
            make.left.right.equalToSuperview()
            make.top.equalToSuperview()
            make.height.equalTo(1)
        }
        line.backgroundColor = .xF2F2F2
        
        let img = scrollView.drawImage(named: "zhifuchenggong_115") { (make) in
            make.centerX.equalToSuperview()
            make.centerY.equalToSuperview().offset(-70)
        }
        
        scrollView.drawLabel(text: "实名认证成功！", fontSize: 18, textColor: .x333333) { (make) in
            make.top.equalTo(img.snp.bottom).offset(20)
            make.centerX.equalToSuperview()
        }
        
        let btn = scrollView.drawButton(title: "返回实名认证", titleColor: .x999999, fontSize: 14) { (make) in
            make.top.equalTo(img.snp.bottom).offset(58)
            make.centerX.equalToSuperview()
            make.width.equalTo(110)
            make.height.equalTo(35)
        }
        btn.backgroundColor = .xF2F2F2
        // 设置边框
        btn.layer.borderWidth = 1
        btn.layer.borderColor = UIColor.x999999.cgColor
        btn.layer.cornerRadius = 13
        btn.addTarget(self, action: #selector(_cancelbtnClick(button:)), for: .touchUpInside)
    }
    
    @objc func _cancelbtnClick(button:UIButton){
        popViewController(vCount: 3)
        let vc = F_UserInfoVC()
        UIViewController.topMostController()?.pushViewController(vc)
    }
}
